package it.scullino.android.actionbar;

import android.content.Intent;

/**
 * First comment is inserted
 */

import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.view.MenuItem;

public class MyPreferenceActivity extends PreferenceActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// Mostro le preferenze
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preference);
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		// Premendo l'icona della app torno alla main activity
		switch (item.getItemId()) {
		case android.R.id.home:
			startActivity(new Intent(MyPreferenceActivity.this,OverviewActivity.class));
			break;

		default:
			break;
		}
		return true;
	}
	
	
}
